# Title: MIPROGRAMA					Filename: MiPrograma.s
# Author:ALEJANDRO HINOJOSA COVARRUBIAS. 		Date:  XX / XX/2017
# Description: DETERMINA QUE CANTIDAD ES MAYOR: 3⁷⁵ o 2¹⁰⁰
# Input: --
# Output: EL NUMERO MAYOR

@.text       :(

##### Code segment ################################################################
.LC0:
        .ascii  "\012 el mayor es: 3^75 = {0}\000"
.LC1:
        .ascii  "\012 el mayor es:2^100 = {0}\000"
        .global main
main:
         stmfd   sp!, {r4, fp, lr}
        add     fp, sp, #8
        sub     sp, sp, #20
        adr     r4, .L5
        ldmia   r4, {r3-r4}
        str     r3, [fp, #-20]
        str     r4, [fp, #-16]
        mov     r3, #0
        mov     r4, #1174405120
        add     r4, r4, #3145728
        str     r3, [fp, #-28]
        str     r4, [fp, #-24]
        mov     r3, #1
        mov     r4, r3
        sub     r1, fp, #20
        ldmia   r1, {r0-r1}
        sub     r3, fp, #28
        ldmia   r3, {r2-r3}
        bl      __aeabi_dcmpgt
        mov     r3, r0
        cmp     r3, #0
        bne     .L2
        mov     r3, #0
        mov     r4, r3
.L2:
        and     r3, r4, #255
        cmp     r3, #0
        beq     .L3
        ldr     r0, .L5+8
        sub     r3, fp, #20
        ldmia   r3, {r2-r3}
        bl      printf
        b       .L4
.L3:
        ldr     r0, .L5+12
        sub     r3, fp, #28
        ldmia   r3, {r2-r3}
        bl      printf
.L4:
        mov     r3, #0
        mov     r0, r3
        sub     sp, fp, #8
        ldmfd   sp!, {r4, fp, pc}
.L5:
        .word   2384075124
        .word   1197295991
        .word   .LC0
        .word   .LC1
